package com.woniuxy.controller;

import com.woniuxy.entitys.TbRole;
import com.woniuxy.services.RoleService;
import com.woniuxy.utils.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Classname RoleController
 * @Date 2024/1/14 15:19
 */
@RestController
public class RoleController {
    @Autowired
    private RoleService roleService;
    @PostMapping("/role/selectRoles")
    public ResultVO selectRoles(){
        List<TbRole> list = roleService.selRoles();
        return list!= null?ResultVO.success("success",list):ResultVO.failure("error");
    }
}
